<div>
	<div class="dataTables_paginate paging_full_numbers">
		<span>
			<span class="paginate_active">
				总<font color="red">${parameters.pager.totalRecords?string("0.#")}</font>条记录&nbsp;&nbsp;共<font color="red">${parameters.pager.totalPages?string("0.#")}</font>页
			</span>
		</span>
		<#if 1==parameters.pager.currentPage>
			<span class="first paginate_button paginate_button_disabled">首页</span>
			<span class="previous paginate_button paginate_button_disabled">上一页</span>
		<#else>
			<span class="first paginate_button" onClick="goto_page('1')">首页</span>
			<span class="previous paginate_button" onClick="goto_page('${(parameters.pager.currentPage-1)?string("0.#")}')">上一页</span>
		</#if>
		
		<span>
			<span class="paginate_active">
				第<input id='_current_page_' size="2" style="height:10px;margin:0 0 -4px;" value="${parameters.pager.currentPage?string("0.#")}">页&nbsp;&nbsp;<font onClick="jumpto_page();">跳转</font>
			</span>
		</span>
		
		<span>
			<span class="paginate_active">
				每页<input id='_page_size_' size="2" style="height:10px;margin:0 0 -4px;" value="${parameters.pager.pageSize?string("0.#")}">条&nbsp;&nbsp;<font onClick="change_pageSize();">跳转</font>
			</span>
		</span>
		
		
		<#if parameters.pager.currentPage==parameters.pager.totalPages>
		 	<span class="next paginate_button paginate_button_disabled">下一页</span>
			<span class="last paginate_button paginate_button_disabled">末页</span>
		<#else>
			<span class="next paginate_button" onClick="goto_page('${(parameters.pager.currentPage+1)?string("0.#")}')">下一页</span>
			<span class="last paginate_button" onClick="goto_page('${parameters.pager.totalPages?string("0.#")}')">末页</span>
		</#if>
	</div>
	
</div>

<script type="text/javascript"> 
    function goto_page(p){  
    	if(!isInt(p)){
    		p =1;
    	}
    	createHiddenCurrentPage(p);
    	createHiddenPageSize();
    	var search_form = document.getElementById("${parameters.formId}");
        search_form.submit();
    }  
    function createHiddenCurrentPage(p){
    	var search_form = document.getElementById("${parameters.formId}");
    	search_form['${parameters.pagerName}.currentPage'] = p; 
    	createHidden(search_form,'${parameters.pagerName}.currentPage',p);
    }
    function createHiddenPageSize(){
    	var search_form = document.getElementById("${parameters.formId}");
    	var pageSize = document.getElementById('_page_size_').value; 
    	if(!isInt(pageSize)){
    		pageSize = 1;
    	}
    	search_form['${parameters.pagerName}.pageSize'] = pageSize;
    	createHidden(search_form,'${parameters.pagerName}.pageSize',pageSize);
    }
    function createHidden(form,hiddenName,hiddenValue){
    	var hidden = document.createElement("input");
    	hidden.setAttribute("name",hiddenName);
    	hidden.setAttribute("value",hiddenValue);
    	hidden.setAttribute("type","hidden");
    	form.appendChild(hidden);
    }
    function jumpto_page(){
    	var cur = document.getElementById('_current_page_').value;
    	goto_page(cur);
    }
    function change_pageSize(){
    	createHiddenPageSize();
    	var cur = document.getElementById('_current_page_').value;
    	createHiddenCurrentPage(cur);
    	var search_form = document.getElementById("${parameters.formId}");
    	search_form.submit();
    }
    function isInt(v){
	    var vArr = v.match(/^[0-9]+$/);
	    if (vArr == null){
	        return false;
	    }else{
	        return true;
	    }
	}
</script>  